Conditions | 1 |
Paths | 1 |
Total Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | import callAPIMethod from './callAPIMethod'; |
||
9 | resource[method] = (params, methodOptions) => { |
||
10 | const apiParams = resources[resourceId].methods[method](params); |
||
11 | const bindedCallAPIMethod = callAPIMethod.bind(null, APIPrefix, fetchOptions, resources[resourceId].prefix); |
||
12 | return applyMiddleware(bindedCallAPIMethod, middleware, methodOptions, apiParams, resourceId, method); |
||
13 | }; |
||
14 | return resource; |
||
20 | export default createAPI; |